<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>英邦国际物流-跟踪查询</title>
    <link href="css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="css/common.css" />
    <link href="css/index.css" rel="stylesheet"/>
    
  </head>
  <body>
  	<nav class="navbar navbar-default">
	    <div class="container">
	    	<div class="mynav hidden-xs">
	    		<div class="logo"><img src="images/logo.png"/></div>
	    		<div class="tel"><span></span><label>020-86213617</label></div>
	    		<div class="nav">
		    		<ul>
		    			<li><a href="index.html">首页</a></li>
		    			<li><a href="order2.html">跟踪查询</a></li>
			    		<li><a href="#">关于我们</a></li>
			    		<li><a href="#">联系我们</a></li>
		    		</ul>
	    		</div>
	    	</div>
	    	
	    	<div class="navbar-header visible-xs">
		      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-hide-content" aria-expanded="false">
		        <span class="sr-only">Toggle navigation</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		      </button>
		      <a class="navbar-brand" href="/">
		      	<img class="logo-xs" src="images/logo.png"/>
		      </a>
		    </div>
		    
		    <div class="collapse" aria-expanded='false' id="navbar-hide-content">
		    	<ul class="nav">
		    		<li class="active"><a href="#">首页</a></li>
		    		<li><a href="#">跟踪查询</a></li>
		    		<li><a href="#">关于我们</a></li>
		    		<li><a href="#">联系我们</a></li>
		    	</ul>
		    </div>
	    </div>
    </nav>
    
    <div class="track-order-box">
    	<div class="container">
    		<div class="input-order">
    			<div class="text">跟踪查询</div>
    			<div class="input-box">
    				<span></span>
    				<input id="trackingNumber" type="text" placeholder="请输入订单号" />
    			</div>
    			<button id="goSelect" class="cursor-pointer">开始查询</button>
    		</div>
    		
    		<div class="tracking">
	    		<div id="findYet" class="order-number" style="display: none"><span id="trackingNumber1"></span> 的走件流程</div>
	    		<div id="notFind" class="order-number" >您的包裹查询不到跟踪信息。</div>
	    		<div class="row">
	    			<div class="col-sm-12 col-md-6">
	    				<ul id="tracks">
	    					<!--<li id="first">-->
	    						<!--<div class="newest">最新</div>-->
	    						<!--<div class="white-line"></div>-->
	    						<!--<div id="firstTime">2015年12月22日 15:17:99</div>-->
	    						<!--<div id="firstContent">快件已经到达深圳市宝安区平洲地铁口 快递员电话号码11111111111111111111</div>-->
	    					<!--</li>-->
							<!--<li>-->
								<!--<div>2015年12月22日 15:17:99</div>-->
								<!--<div>快件已经到达深圳市宝安区平洲地铁口</div>-->
							<!--</li>-->
	    				</ul>
	    			</div>
	    		</div>
	    	</div>
    	</div>
    </div>
	<footer>
		<div class="links">
			<div class="container">
				<ul>
					<li>友情链接　/　LINKS　</li>
					<li><a href="http://www.17track.net" target="_blank">17TRACK-全球物流查询平台</a></li>
					<li><a href="http://www.ruston.cc/" target="_blank">俄速通</a></li>
					<li><a href="http://www.sprintpack.com.cn/" target="_blank">欧速通</a></li>
					<li><a href="order2.html" target="_blank">快递查询</a></li>
				</ul>
			</div>
		</div>

		<div class="company-info">
			<div class="container">
				<div class="row">
					<div class="col-xs-12 col-sm-6">
						<div class="info-item-box">
							<ul>
								<li><a>走进英邦</a></li>
								<li><a>关于我们</a></li>
								<li><a>企业文化</a></li>
								<li><a>发展历程</a></li>
								<li><a>合作伙伴</a></li>
								<li><a>公司荣誉</a></li>
							</ul>
							<ul>
								<li><a>咨询中心</a></li>
								<li><a>新闻公告</a></li>
								<li><a>行业动态</a></li>
							</ul>
							<ul>
								<li><a>人才招聘</a></li>
								<li><a>人才理念</a></li>
								<li><a>招聘职位</a></li>
								<li><a>员工风采</a></li>
							</ul>
							<ul>
								<li><a>客户服务</a></li>
								<li><a>常见问题</a></li>
								<li><a>订单咨询</a></li>
								<li><a>在线客服</a></li>
							</ul>
						</div>
					</div>
					<div class="col-xs-12 col-sm-6">
						<div class="qr-code-box clear-float">
							<div class="qr-code">
								<img src="images/code.png"/>
								<div>微信公众号</div>
							</div>
							<div class="qr-code">
								<img src="images/code.png"/>
								<div>官方微博</div>
							</div>
						</div>
						<div class="btn-tel">
							<span class="cursor-pointer">020-86213617</span>
						</div>
					</div>
				</div>
			</div>
		</div>


		<div class="copyright">
			Copyright © 2009 3856.cc  All Rights Reserved   深圳英邦物流有限公司版权所有
		</div>


	</footer>
	
    <script src="js/jquery1.12.4.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/font.js" ></script>
	<script>
		$(function(){
			var trackingNumber = getQueryString("trackingNumber");
			if(!!trackingNumber){
				$("#trackingNumber").val(trackingNumber);
				$("#trackingNumber1").text(trackingNumber);
				goSelect(trackingNumber);
			}


			$("#goSelect").on("click",function(){
				goSelect($("#trackingNumber").val());
			});


			//回车事件绑定
			$('#trackingNumber').bind('keyup', function(event) {
				if (event.keyCode == "13") {
					//回车执行查询
					goSelect($("#trackingNumber").val());
				}
			});
		});
		function getQueryString(name) {
			var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
			var r = window.location.search.substr(1).match(reg);
			if (r != null) {
				return unescape(r[2]);
			}
			return null;
		}
		function goSelect(trackingNumber){
			$("#tracks").empty();
			$("#notFind").hide();
			$("#findYet").hide();
			$.ajax({
				type: 'post',
				url: "tracking/getInfo",
				dataType:"json",
				contentType: "application/json;charset=utf-8;",
				data: JSON.stringify({trackingNumber:trackingNumber}),
				success: function(result){
					var data = result.data[0];
					if(result.code=="000000"){
						$("#trackingNumber1").text(trackingNumber);
						$("#findYet").show();
					}else{
						$("#notFind").show();
						return ;
					}
					var details = data.trackDetails;
					for(var o in details){

						if(o==0){
							var firstDiv = $("<div>").attr("class","newest").text("最新");
							var whiteLine = $("<div>").attr("class","white-line");
							var track_createdate = $("<div>").text(details[o].track_createdate);
							var firstContent = $("<div>").text(details[o].track_location+","+details[o].track_content);
							var i = $("<span><i></i></span>");
							var li = $("<li>").append(firstDiv).append(whiteLine).append(track_createdate).append(firstContent).append(i);
							$("#tracks").append(li);
						}else{
							var time = $("<div>").text(details[o].track_createdate);
							var content = $("<div>").text(details[o].track_location+","+details[o].track_content);
							var i = $("<span><i></i></span>");
							var li = $("<li>").append(time).append(content).append(i);
							$("#tracks").append(li);
						}
					}
				}
			});
		}
	</script>
  </body>
</html>